<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width , initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css">
</head>
<body>
<!--导航-->
<nav th:replace="_fragments :: menu(1)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu " content="">
             <h2 class="ui teal header item">Blog</h2>
            <a href="#" class="m-item m-mobile-hide item"><i class="home icon"></i>首页</a>
            <a href="#" class="m-item m-mobile-hide item"><i class="idea icon"></i>分类</a>
            <a href="#" class="m-item m-mobile-hide item"><i class="clone icon"></i>归档</a>
            <a href="#" class="m-item m-mobile-hide item"><i class="tags icon"></i>标签</a>
            <a href="#" class="m-item m-mobile-hide item"><i class="info icon"></i>关于我</a>
            <a href="#" class="m-item m-mobile-hide item"><i class="info icon"></i>admin</a>
           <div class="right item">
               <div class="ui icon inverted transparent input">
                   <input type="text" placeholder="search">
                   <i class="search link icon"></i>
               </div>
           </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>
<!--中间部分-->
<div class=" m-container m-padded-tb-big">
    <div class="ui container">
        <div class="ui stackable grid">
<!--            左边博客-->
            <div class="eleven wide column">
<!--                头部部分-->
                <div class="ui top attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui teal header">博客</h3>
                        </div>
                        <div class="column right aligned">
                            共<h2 class="ui orange header m-inline-block m-text-thin" th:text="${page.totalElements}">14</h2>篇
                        </div>
                    </div>
                </div>
<!--                content-->
                <div class="ui attached segment">
<!--                    文章内容-->
                    <div class="ui padded vertical segment m-padded-tb-large">
                        <div class="ui mobile reversed stackable grid" th:each="blog : ${page.content}">
                            <!--                            左边的博客列表-->
                            <div class="eleven wide column">
                                <h3 class="ui header"><a href="#" style="color: #0a001f!important;" th:text="${blog.title}" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">这是一个标题！！！！！</a></h3>
                                <p th:text="${blog.description}">内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容</p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="http://pic2.zhimg.com/50/v2-5ae70af9c5676dffdaba2abc324934f5_hd.jpg" th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image">
                                                <div class="content"><a href="#" th:text="@{${blog.user.nickname}}" class="header">胡文昊</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i> <span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020:2:7</span>
                                            </div>
                                            <div class="item">
                                                <i class="eyes icon"></i><span th:text="${blog.views}">123</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" class="ui label teal basic m-padded-tiny m-text-thin" th:text="${blog.type.name}">认知升级</a>
                                    </div>
                                </div>
                            </div>
                            <!--                            右边的top-->
                            <div class="five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1581050339857&di=30180e51c93afede044868a1e7b5de3c&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201801%2F30%2F20180130140345_3WY4v.jpeg" th:src="@{${blog.firstPicture}}" style="heigh: 800px; width: 450px;" alt="" class="ui rounded image">
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
<!--                翻页栏-->
                <div class="ui bottom attached segment" th:if="${page.totalPages}>1">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" class="ui basic teal mini  button" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}" >上一页</a>
                        </div>
                        <div class="column right aligned">
                            <a href="#" class="ui basic teal mini button" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}">下一页</a>
                        </div>
                    </div>
                </div>
            </div>
<!--            右边top-->
            <div class="five wide column">
<!--                分类-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="column right aligned">
                                <a href="#" target="_blank">more <i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <div class="ui vertical fluid menu">
                            <a href="#" class="item" th:each="types : ${types}">
                                <span th:text="${types.name}">学习日志</span>
                                <div class="ui teal basic left pointing label" th:text="${#arrays.length(types.blogs)}">13</div>
                            </a>
                            <a href="#" class="item"><div class="ui teal basic left pointing label">13</div>思考感悟</a>
                            <a href="#" class="item"><div class="ui teal basic left pointing label">13</div>选项1</a>
                            <a href="#" class="item"><div class="ui teal basic left pointing label">13</div>选项1</a>
                            <a href="#" class="item"><div class="ui teal basic left pointing label">13</div>选项1</a>
                            <a href="#" class="item"><div class="ui teal basic left pointing label">13</div>选项1</a>
                        </div>
                    </div>
                </div>
<!--                标签-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="tags icon"></i>标签
                            </div>
                            <div class="column right aligned">
                                <a href="#" target="_blank">more <i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>
                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>


                        <a href="#" class="ui label teal basic left pointing m-margin-tb-tiny">
                            tag1 <div class="detail">2</div>
                        </a>

                    </div>
                </div>
<!--                最新推荐-->
                    <div class="ui segments m-margin-top-large">
                        <div class="ui secondary segment">
                            <div class="ui two column grid">
                                <div class="column">
                                    <i class="tags icon"></i>最新推荐
                                </div>
                            </div>
                        </div>
                        <div class="ui segment m-text-color-black" th:each="blog : ${recommendBlogs}">
                            <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-text-color-black m-text-thin" th:text="${blog.title}">用户故事</a>
                        </div>
                    </div>
<!--                二维码-->
                    <div class="ui horizontal divider header">
                        <h4>扫码关注</h4>
                        <div class="ui center aligned card" style="width: 250px;">
                            <img src="../static/jpg/QRcode.png" th:src="@{/jpg/QRcode.png}" alt="" class="ui rounded image">
                        </div>
                    </div>
            </div>
        </div>
    </div>
</div>
<!--                footer-->
<footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted column">
                    <img src="../static/jpg/QRcode.png" th:src="@{/jpg/QRcode.png}" style="width: 120px;height: 120px" alt="">
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">这是一个标题</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">内容内容内容内容内容</a>
                    <a href="#" class="item">内容内容内容内容内容</a>
                    <a href="#" class="item">内容内容内容内容内容</a>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">这是一个标题</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">内容内容内容内容内容</a>
                    <a href="#" class="item">内容内容内容内容内容</a>
                    <a href="#" class="item">内容内容内容内容内容</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header">这是一个标题</h4>
                <div class="ui inverted link list">
                    <p class="m-text-space">内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容</p>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin">copy right</p>
    </div>
</footer>
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<!--/*/</th:block>/*/-->

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-show');
    });
</script>
</body>
</html>